package com.yc.navy.dayfresh.service.Impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yc.navy.dayfresh.bean.AddrInfo;
import com.yc.navy.dayfresh.mapper.IAddrInfoMapper;
import com.yc.navy.dayfresh.service.IAddrInfoService;
import com.yc.navy.dayfresh.util.StringUtil;

@Service
public class AddrInfoServiceImpl implements IAddrInfoService{
	@Autowired
	private IAddrInfoMapper addrInfoMapper;

	@Override
	public int add(AddrInfo add) {
		if(StringUtil.checkNull(add.getName(),add.getTel(),add.getProvince(),add.getCity(),add.getArea())) {
			return -1;
		}
		return addrInfoMapper.add(add);
	}

	@Override
	public List<AddrInfo> finds(long mno) {
		return addrInfoMapper.finds(mno);
	}

}
